﻿package mortal.game.view.copy.worldBoss.worldBossEnter
{
    import Message.DB.Tables.*;
    import com.mui.controls.*;
    import com.mui.display.*;
    import mortal.component.gconst.*;
    import mortal.game.cache.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class WorldBossListCellRenderer extends GSprite implements ITabBar2Cell
    {
        private var _imageBg:GImageBitmap;
        private var _imageName:GImageBitmap;
        private var _imageLevel:GImageBitmap;
        private var _selectFilter:ScaleBitmap;
        private var _imageServer:GImageBitmap;

        public function WorldBossListCellRenderer()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.mouseEnabled = true;
            this._imageBg = UIFactory.gImageBitmap("", 0, 0, this);
            this._imageName = UIFactory.gImageBitmap("", 20, 11, this);
            this._imageLevel = UIFactory.gImageBitmap("", 95, 46, this);
            this._imageServer = UIFactory.gImageBitmap("", 0, 10, this);
            this._selectFilter = UIFactory.bg(-1, -1, 227, 82, this, ImagesConst.MountCardSelectBg);
            this._selectFilter.visible = false;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._imageBg.dispose(param1);
            this._imageBg = null;
            this._imageName.dispose(param1);
            this._imageName = null;
            this._imageLevel.dispose(param1);
            this._imageLevel = null;
            this._selectFilter.dispose(param1);
            this._selectFilter = null;
            this._imageServer.dispose(param1);
            this._imageServer = null;
            return;
        }// end function

        public function set selected(param1:Boolean) : void
        {
            this._selectFilter.visible = param1;
            return;
        }// end function

        public function set data(param1:Object) : void
        {
            var _loc_2:* = param1 as TWorldBoss;
            this._imageBg.imgUrl = _loc_2.bossHeadImage;
            this._imageName.imgUrl = _loc_2.bossNameImage;
            this._imageLevel.imgUrl = _loc_2.bossLevelImage;
            this._imageServer.imgUrl = _loc_2.type == 1 ? ("WorldBossSelfSever.png") : ("WorldBossCross.png");
            var _loc_3:* = Cache.instance.copy.worldBoss.getBossIsDeath(_loc_2.bossCode);
            if (_loc_3)
            {
                this.filters = [FilterConst.colorFilter];
            }
            else
            {
                this.filters = [];
            }
            return;
        }// end function

        public function over() : void
        {
            return;
        }// end function

        public function out() : void
        {
            return;
        }// end function

    }
}
